<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<style type="text/css">
.greet{
	
	font-weight: bold;
	font-size: 14pt;
	font-style: italic;
	color: Gray;		
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>List of Tests</title>
</head>
<body>
<div align="left" class="greet">
Welcome &nbsp; <s:property value="loggedUser"/>!
</div>
<h2 align="center">Available Test Details </h2>
<br>
<br>
	<ol>
		<s:iterator value="tests" var="eachTest">
			<li>
				 
				<s:url action="startExam.action" var="target">
					<s:param name="testId"><s:property value="#eachTest.testId"/></s:param>
				</s:url>
				<s:if test="%{#eachTest.disabled=='false'}">
					<s:a href="%{target}"><s:property value="#eachTest.testName"/> - </s:a>
				</s:if>
				<s:else>
					<s:property value="#eachTest.testName"/> - 
				
				</s:else>
				<s:property value="#eachTest.testDescription"/>
				&nbsp;<s:property value="#eachTest.duration"/>(min)
	 		</li>
	
		</s:iterator>
	</ol>
	
	<br>
	<s:url value="LogOut.jsp" var="logout" />
	<s:a href="%{logout}" >Logout</s:a>
</body>
</html>